<template>
  <h3>这里是翟昌树的子类标签</h3>
<div>{{ msg }}</div>
<button @click="sendMessage">给父组件发消息</button>
</template>

<script setup>
defineProps({
  msg:String
})

const exit = defineEmits(['sendMessage-end'])
function sendMessage(){
  exit('sendMessage-end','这里是子组件传递的消息')
}
</script>